package com.mng.index12306.framework.starter.convention.exception;

import com.mng.index12306.framework.starter.convention.errorcode.BaseErrorCode;
import com.mng.index12306.framework.starter.convention.errorcode.IErrorCode;

/**
 * @Description : 客户端异常
 * @Author : YuShaochao
 * @Date : 2024-04-25 16:41
 */
public class ClientException extends AbstractException{
    public ClientException(IErrorCode errorCode){
        this(null,null,errorCode);
    }

    public ClientException(String message) {
        this(message,null, BaseErrorCode.CLIENT_ERROR);
    }

    public ClientException(String message,IErrorCode errorCode) {
        this(message,null,errorCode);
    }

    public ClientException(String message, Throwable throwable, IErrorCode errorCode) {
        super(message, throwable, errorCode);
    }

    @Override
    public String toString() {
        return "ClientException{" +
                "code='" + errorCode + "'," +
                "message='" + errorMessage + "'" +
                '}';
    }
}
